import WeiyiListSelector from '../packages/weiyi-list-selector/index.js';

const install = function(Vue) {
  if (install.installed) return;

  Vue.component(WeiyiListSelector.name, WeiyiListSelector);
  // Vue.use(InfiniteScroll);
  // Vue.use(Lazyload, {
  //   loading: require('./assets/loading-spin.svg'),
  //   try: 3
  // });

  Vue.$messagebox = Vue.prototype.$messagebox = MessageBox;
  Vue.$toast = Vue.prototype.$toast = Toast;
  Vue.$indicator = Vue.prototype.$indicator = Indicator;
};
 
// auto install
if (typeof window !== 'undefined' && window.Vue) {
  install(window.Vue);
};

module.exports = {
  install: install,
  version: '0.0.18',
  WeiyiListSelector
};
